package reflection;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author yunfei.shang
 * @title
 * @date 2018/09/07 15:32
 * @descreption
 */
public class TestDemo {
    public static void main(String[] args) {
        String time = transferLongToDate("yyyy-MM-dd HH:mm:ss", 1536305446983L);
        System.out.println(time);
    }

    public static String transferLongToDate(String dateFormat, Long millSec) {
        SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
        Date date = new Date(millSec);
        return sdf.format(date);
    }
}
